

#ifndef __BASEEDITOR_H__
#define __BASEEDITOR_H__

#include <QObject>
#include <QWidget>

class BaseEditorWidget : public QWidget
{
  Q_OBJECT
private:
  QString _name;
  bool  _dirty;

protected:
  BaseEditorWidget (QWidget* parent = 0);

public:
  void SetDirty (bool dirty);
  virtual bool IsDirty () const;

  void SetName (const QString& name);
  virtual const QString& GetName () const;

  virtual void* GetData ();
  virtual QString GetTypeName ();
  virtual QString GetUnsaveMessage ();

public slots:
  virtual void Save ();
  virtual void Compile ();

signals:
  void DirtyChanged (bool dirty);
  void NameChanged (const QString& name);

};

#endif /* __BASEEDITOR_H__ */

